#include<bits/stdc++.h>
#define int long long
#define N 1000005 
using namespace std;

int id, n, Q;
int X1[N], Y1[N], X2[N], Y2[N];

int cnt;

int Len[N * 4], Min[N * 4], sum[N * 4], tag[N * 4]; 

struct op {
	int tim, l, r, x;
}a[N];
bool cmp(op A, op B) {
	return A.tim < B.tim;
}
int z[N];
int tot;

void pushup(int u) {
	Len[u] = Len[u * 2] + Len[u * 2 + 1];
	Min[u] = min(Min[u * 2], Min[u * 2 + 1]);
	if(Min[u * 2] < Min[u * 2 + 1]) sum[u] = sum[u * 2];
	else if(Min[u * 2] > Min[u * 2 + 1]) sum[u] = sum[u * 2 + 1];
	else sum[u] = sum[u * 2] + sum[u * 2 + 1];
}
void build(int u, int L, int R) {
	if(L == R) {
		Len[u] = sum[u] = z[L + 1] - z[L];
		return;
	}
	int mid = (L + R) / 2;
	build(u * 2, L, mid);
	build(u * 2 + 1, mid + 1, R);
	pushup(u);
}
void maketag(int u, int x) {
	Min[u] += x;
	tag[u] += x;
}
void pushdown(int u) {
	if(!tag[u]) return;
	maketag(u * 2, tag[u]);
	maketag(u * 2 + 1, tag[u]);
	tag[u] = 0;
}
void update(int u, int L, int R, int l, int r, int x) {
	if(R < l || r < L) return;
	if(l <= L && R <= r) {
		maketag(u, x);
		return;
	}
	int mid = (L + R) / 2;
	pushdown(u);
	update(u * 2, L, mid, l, r, x);
	update(u * 2 + 1, mid + 1, R, l, r, x);
	pushup(u);
}
int Sol(int l, int r) {
	cnt = 0;										
	int ans = 0;
	tot = 0;
	int num = 0;
	for(int i = l; i <= r; i++) {
		a[++tot] = ((op){X1[i], Y1[i], Y2[i], 1});
		a[++tot] = ((op){X2[i], Y1[i], Y2[i], -1});	
		z[++num] = Y1[i];
		z[++num] = Y2[i];
	}
	sort(z + 1, z + num + 1);
	num = unique(z + 1, z + num + 1) - z - 1;
	for(int i = 1; i <= num * 4; i++) sum[i] = Len[i] = Min[i] = tag[i] = 0;
	build(1, 1, num - 1);
	sort(a + 1, a + tot + 1, cmp);
	for(int i = 1; i <= tot; i++) {
		
		if(i != 1 && a[i].tim != a[i - 1].tim) {
			if(!Min[1]) {
				ans += (a[i].tim - a[i - 1].tim) * (Len[1] - sum[1]); 
			} 
			else {
				ans += (a[i].tim - a[i - 1].tim) * Len[1];
			}
		
		}
		int L = lower_bound(z + 1, z + num + 1, a[i].l) - z;
		int R = lower_bound(z + 1, z + num + 1, a[i].r) - z;
		update(1, 1, num - 1, L, R - 1, a[i].x);
	}
	return ans;
}

signed main() {
	freopen("dierti.in", "r", stdin);
	freopen("dierti.out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

	cin >> id >> n >> Q;
	for(int i = 1; i <= n; i++) {
		cin >> Y1[i] >> X1[i] >> Y2[i] >> X2[i];
	}
	while(Q--) {
		int l, r;
		cin >> l >> r;
		cout << Sol(l, r) << endl;
	}
	return 0;
}

/*
0
2 1
1 1 3 3
2 2 4 4
1 2
*/

/*
0
3 3
1 2 2 3
1 1 3 3
2 1 3 3
1 2
2 3
1 3

*/


